package com.zhiche.lisa.lspm.dao.mapper.driver;


import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.zhiche.lisa.lspm.dao.model.driver.DriverLicense;
import com.zhiche.lisa.lspm.dao.model.driver.bo.DriverLicenseBO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 司机证照 Mapper 接口
 * </p>
 *
 * @author qichao
 * @since 2018-05-23
 */
public interface DriverLicenseMapper extends BaseMapper<DriverLicense> {

    /**
     * 根据证照code查询
     */
    DriverLicenseBO selectByLicenseType(@Param("driverId") Long driverId, @Param("licenseTypeCode") String licenseTypeCode, @Param("subjectType") String subjectType);

    /**
     * 批量添加
     */
    void batchInsert(@Param("licenseList")List<DriverLicense> licenseList);

    DriverLicense selectOneNoTenant(@Param("ew") Wrapper<DriverLicense> ew);

    List<DriverLicense> selectListNoTenant(@Param("ew") EntityWrapper<DriverLicense> licenseEW);
}
